package demo3;

import demo4.IFly;
import demo4.IRun;
import demo4.ISwim;

/**
 * @Author: Lenovo
 * @Date: 2024/5/22 22:45
 * @description:
 */
public class Duck extends Animal implements IFly, IRun, ISwim {
    public Duck(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(this.name+" 正在吃鸭粮...");
    }

    @Override
    public void Fly() {
        System.out.println(this.name+" 正在飞...");
    }

    @Override
    public void Run() {
        System.out.println(this.name+ "正在跑...");
    }

    @Override
    public void Swim() {
        System.out.println(this.name+" 正在游泳...");
    }
}
